﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Whoever.Health.Business
{
    public class ManagerFactory
    {
        private static UserManager _userManager;
        private static ProfileManager _profileManager;
        private static ContactManager _contactManager;
        private static ContactStatusManager _contactStatusManager;
        private static ContactTypeManager _contactTypeManager;
        private static DocumentManager _documentManager;
        private static DocumentTypeManager _documentTypeManager;
        private static AddressManager _addressManager;
        private static AddressTypeManager _addressTypeManager;
        private static MailManager _mailManager;
        private static MailTypeManager _mailTypeManager;
        private static PhoneManager _phoneManager;
        private static PhoneTypeManager _phoneTypeManager;

        public static UserManager UserManager { get { if (_userManager != null)  return _userManager; else { _userManager = new UserManager(); return _userManager; } } }
        public static ProfileManager ProfileManager { get { if (_profileManager != null)  return _profileManager; else { _profileManager = new ProfileManager(); return _profileManager; } } }
        public static ContactManager ContactManager { get { if (_contactManager != null)  return _contactManager; else { _contactManager = new ContactManager(); return _contactManager; } } }
        public static ContactStatusManager ContactStatusManager { get { if (_contactStatusManager != null)  return _contactStatusManager; else { _contactStatusManager = new ContactStatusManager(); return _contactStatusManager; } } }
        public static ContactTypeManager ContactTypeManager { get { if (_contactTypeManager != null)  return _contactTypeManager; else { _contactTypeManager = new ContactTypeManager(); return _contactTypeManager; } } }
        public static DocumentManager DocumentManager { get { if (_documentManager != null)  return _documentManager; else { _documentManager = new DocumentManager(); return _documentManager; } } }
        public static DocumentTypeManager DocumentTypeManager { get { if (_documentTypeManager != null)  return _documentTypeManager; else { _documentTypeManager = new DocumentTypeManager(); return _documentTypeManager; } } }
        public static AddressManager AddressManager { get { if (_addressManager != null)  return _addressManager; else { _addressManager = new AddressManager(); return _addressManager; } } }
        public static AddressTypeManager AddressTypeManager { get { if (_addressTypeManager != null)  return _addressTypeManager; else { _addressTypeManager = new AddressTypeManager(); return _addressTypeManager; } } }
        public static MailManager MailManager { get { if (_mailManager != null)  return _mailManager; else { _mailManager = new MailManager(); return _mailManager; } } }
        public static MailTypeManager MailTypeManager { get { if (_mailTypeManager != null)  return _mailTypeManager; else { _mailTypeManager = new MailTypeManager(); return _mailTypeManager; } } }
        public static PhoneManager PhoneManager { get { if (_phoneManager != null)  return _phoneManager; else { _phoneManager = new PhoneManager(); return _phoneManager; } } }
        public static PhoneTypeManager PhoneTypeManager { get { if (_phoneTypeManager != null)  return _phoneTypeManager; else { _phoneTypeManager = new PhoneTypeManager(); return _phoneTypeManager; } } }
    }
}
